UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/l3tjtzrlAjJ9ZN8nwZGN5vg9jn+l+UmoMQpkbO93+0='
WHERE
key_id = '74d5420113023e73441a3226dcc9554c457e1f10e558b09b739acb3c3000f57d'
AND (
token = '/l3tjtzrlAjJ9ZN8nwZGN5vg9jn+l+UmoMQpkbO93+0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)