UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nobHEFyPXMG+ZnJcEsOhP0FJNaKlsSZK8NGlBJth1Eg=' 
WHERE 
  key_id = 'fcfef7ff7d88e07a678b02f33f3d6eec9346f8bbd3a6c260716186a77ed99e6c' 
  AND (
    token = 'nobHEFyPXMG+ZnJcEsOhP0FJNaKlsSZK8NGlBJth1Eg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017