UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/E5lhbVkCcfkN8IsPMRMHAHo4K1WS4xXqgBTgxJq+WA='
WHERE
key_id = '3e6138d4dfbd683236ce677cb3777a3348d2c4d3a2b46d44ba95a88c73137edc'
AND (
token = '/E5lhbVkCcfkN8IsPMRMHAHo4K1WS4xXqgBTgxJq+WA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)