UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hz5ZIEfoVSArFd3omfK1TjuZxzfEujjWfV0JWJTi/0M=' 
WHERE 
  key_id = 'e83d221351c604723c5a135402809c0e60b0e517a5f6d0961dcb49b93fca90b6' 
  AND (
    token = 'hz5ZIEfoVSArFd3omfK1TjuZxzfEujjWfV0JWJTi/0M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036