UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EvuPtx5onMiaoZg0cJbgRFmp9in+n3zwmKHL9lhM5FQ=' 
WHERE 
  key_id = 'fc8b05c778dcf07c84fbd74c8ce999c5e9f11721c4b0b242fdc0615a138d5403' 
  AND (
    token = 'EvuPtx5onMiaoZg0cJbgRFmp9in+n3zwmKHL9lhM5FQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039