UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'trcSGLBW0M42yyMvmp7cxHMH+ocgynyLM/FlOle+GPM=' 
WHERE 
  key_id = 'ef95f494a2cef0acda6eb722cc0f1f25a0bde06621555d0244e15d1ad981f59b' 
  AND (
    token = 'trcSGLBW0M42yyMvmp7cxHMH+ocgynyLM/FlOle+GPM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042