UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l1vvmi9f1m/kKdnYvXZdJgXS7GpYwDaN/mXdV754a6k='
WHERE
key_id = '1369bf44a158d92d17f117e24dfdd1da7e2e08177ae1173ad9415989d30c1e12'
AND (
token = 'l1vvmi9f1m/kKdnYvXZdJgXS7GpYwDaN/mXdV754a6k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)