UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mSOCgH/Z/1v9h+YwkpM42ZHwNiTm2ECBHw3QiA8Im+k=' 
WHERE 
  key_id = 'ef027741ffbeb0d1497555b2a9f9d1380ee7297d6da9af4c3c54c2180c5634d0' 
  AND (
    token = 'mSOCgH/Z/1v9h+YwkpM42ZHwNiTm2ECBHw3QiA8Im+k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00073