UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eDhainBjTZSpSCJGdCjXSPHvKu/6wGOaARcZM2scXS4=' 
WHERE 
  key_id = '73ca2e9c6941e231d0fc1510f8b7e8f05e49d5f8caa6bf877b4bc19b5fdbf0bf' 
  AND (
    token = 'eDhainBjTZSpSCJGdCjXSPHvKu/6wGOaARcZM2scXS4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026