UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GWkAQDpccsEBsWfasw/XSt/APvRPvSIGLqnPvsf/nQQ=' 
WHERE 
  key_id = 'cbf4f14267d647bda7a8a99900c7ede5d8e2cc1b4687e380d09f5fbc6574372e' 
  AND (
    token = 'GWkAQDpccsEBsWfasw/XSt/APvRPvSIGLqnPvsf/nQQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040