UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aTQAkGaFlI6QuqJ2osFmGwf4fJB+NbL59tHblgDcbzQ='
WHERE
key_id = '2fd28f4c9d58c83ae5131e4716b7d2dbbea81d9d0db0ccc7ba3e38b4fa617bc5'
AND (
token = 'aTQAkGaFlI6QuqJ2osFmGwf4fJB+NbL59tHblgDcbzQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)