UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Yu8xxHlqTGeLRoCLQtot4BReZNt4zMSEGHFbMF6+9rY='
WHERE
key_id = '4368e8f1b3e2360fdf1dfedf1881c3281e9cd587efb928c111f1211453ceea60'
AND (
token = 'Yu8xxHlqTGeLRoCLQtot4BReZNt4zMSEGHFbMF6+9rY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)