UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hIEZOB8hCXccKHe2or1BOgSD+5dQeWqoWjUtqkFC4P8=' 
WHERE 
  key_id = '35d0bfefabf38fe45799b371ff794d8f86bff73afd81bfb66a3da5fed86bcf49' 
  AND (
    token = 'hIEZOB8hCXccKHe2or1BOgSD+5dQeWqoWjUtqkFC4P8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00067