UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4rOwGG34e/RAcyMt9/pnai2IB2gtm25Zu/uzaml2PaA='
WHERE
key_id = '61981bcf1604f703dcf5b419fd3d2ad6f470e0fa4e8f78419e505ec3bcc3d95d'
AND (
token = '4rOwGG34e/RAcyMt9/pnai2IB2gtm25Zu/uzaml2PaA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)