UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tEUuG6/NW1ptJ8L2dQ5buZHz/Dsm6M3gWVIpDz0hPn0=' 
WHERE 
  key_id = 'de0a3522d58b5b28830e583fd5e3ddf89212e71ed49c143c8d7cb0feef80ffd7' 
  AND (
    token = 'tEUuG6/NW1ptJ8L2dQ5buZHz/Dsm6M3gWVIpDz0hPn0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034