UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jLKCfpyLOgZJcQIHMDzKmAN7pvOH6kLyBNaa1/vCHTk='
WHERE
key_id = '672d45d729e5dc6143df61e40d02377f4e3121e43845879f186ff512e57dd6fa'
AND (
token = 'jLKCfpyLOgZJcQIHMDzKmAN7pvOH6kLyBNaa1/vCHTk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)