UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+cu6rhfCwl6vCU2MpAYUPJ0ONB5FUAMYC4a+uiGVS5c='
WHERE
key_id = '133c7928ad38f3a651403e9d82f754ad512f95b8d1c3bbacb709fba2a7e18bfa'
AND (
token = '+cu6rhfCwl6vCU2MpAYUPJ0ONB5FUAMYC4a+uiGVS5c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)