UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MPzpTKd0UEOrT9mGGoroJ6O+Yp3wVEPHPz7g32FTPwo='
WHERE
key_id = '20fa6228803cdeac82238af88fb274a46b9dddbdcc12841e3c1968e8bb6075bb'
AND (
token = 'MPzpTKd0UEOrT9mGGoroJ6O+Yp3wVEPHPz7g32FTPwo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)