UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L3uaevsYBvK9TkyS5y2WIjcQWf8Sqg0TN6xMSk4JOCE='
WHERE
key_id = '5060ea8155ac3eed7f928b119638a384a0ab7604dfac66da3b513dca0fd57194'
AND (
token = 'L3uaevsYBvK9TkyS5y2WIjcQWf8Sqg0TN6xMSk4JOCE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)