UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'I8VeqTekMlJal0TTrToqZqq3+75y4wH5fsFLKAZCbA8='
WHERE
key_id = '55b0c1f0d09aa7b3383bdc5f0690aa387a6db45cd4416cd9fae589af43e1e3c9'
AND (
token = 'I8VeqTekMlJal0TTrToqZqq3+75y4wH5fsFLKAZCbA8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)