UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AK68DM9nWt+7GjPOyfPRpKy5vtSTg6KCa+gEenH27vM='
WHERE
key_id = '64ef8883a1623bf477770d5d84d63daff1cc9c2589d9c3c0d537bbc15aaab9f2'
AND (
token = 'AK68DM9nWt+7GjPOyfPRpKy5vtSTg6KCa+gEenH27vM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)