UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mOL7zmdwCCwBZSgcyel5f37wvfTWDLjV9921FCz5cNg=' 
WHERE 
  key_id = '6650531f1edf1337448c5a3c563e3f3f6c6671746d949e9ee800ce6c36620d12' 
  AND (
    token = 'mOL7zmdwCCwBZSgcyel5f37wvfTWDLjV9921FCz5cNg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035