UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LLMWP+/MYyjcWlmEIkDXgzwQJGk3rIjThuZlywi4QWA='
WHERE
key_id = 'aca3e77bb96e50353eb08abb267bb0bbac4a48eacd50032a24c4f6adce2d44a5'
AND (
token = 'LLMWP+/MYyjcWlmEIkDXgzwQJGk3rIjThuZlywi4QWA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)