UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '76EtNtkNmJkr2/1oZOYaznJ7qiCJ8NkPzWlqDpLjfR8=' 
WHERE 
  key_id = 'ef4cc214cc1c2d0f96d9a68a3bab6a8ab98dbfdbd6287f4ca63c8bdff63736fb' 
  AND (
    token = '76EtNtkNmJkr2/1oZOYaznJ7qiCJ8NkPzWlqDpLjfR8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035