UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YuHP5w1UyX92NQhO6hdoaQXUl8ph96h/yj6udQBQPIc='
WHERE
key_id = '06938fcd8060ce450e83c56e61f01d41ada1569775737a574b8b16e09807db42'
AND (
token = 'YuHP5w1UyX92NQhO6hdoaQXUl8ph96h/yj6udQBQPIc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)