UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RfdUr6aFF7GSQy6jH7bK6oTN2d+uW7EbK91okJpLbkg='
WHERE
key_id = '156c063f125c0388c57070751f8b840a96bb25cb41066aa3ea73a00ff3df8a06'
AND (
token = 'RfdUr6aFF7GSQy6jH7bK6oTN2d+uW7EbK91okJpLbkg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)