UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UTC5e/lXMTfnO6DnLFnRNHn71gJG3NHvd2Cq56nncvI=' 
WHERE 
  key_id = 'f515ad47e5a5f8f696b906693b7e7f0d05966981e899bd2b672044b6055dceeb' 
  AND (
    token = 'UTC5e/lXMTfnO6DnLFnRNHn71gJG3NHvd2Cq56nncvI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016