UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'dr/TSt4o53/h+XG/dkNUjpep2cIce7UFQPD0HDvBy/k=' 
WHERE 
  key_id = '57899b2bb12c028cf9405ac970daa2ee54a5d7e49c197c2ed02770cfa5ab4ad7' 
  AND (
    token = 'dr/TSt4o53/h+XG/dkNUjpep2cIce7UFQPD0HDvBy/k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016