UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+sye3n+K2vv86JhCyMpaDIgncSmjNYN2B1E4hT9JQsE=' 
WHERE 
  key_id = 'fd9dd88f0761d98ab74a45f74abe1e733c43e0e9f69a7a44aa4d322fde1e3fff' 
  AND (
    token = '+sye3n+K2vv86JhCyMpaDIgncSmjNYN2B1E4hT9JQsE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00013