UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aU/SZxwxJtOdvP/sCKLBrCZ55ToEd0oZHl/TO19/K0A='
WHERE
key_id = '6a6f6433010241757cc40f678e21d4864b88a25c93e49fb1ec1f47cfc5b7c249'
AND (
token = 'aU/SZxwxJtOdvP/sCKLBrCZ55ToEd0oZHl/TO19/K0A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)