UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '61NUDKaAMAMp2PNKDNTFvaQuZR3WDh/yGQiMe1zI+qM='
WHERE
key_id = '19ee8b1b926315f95b4797108d9bed69fa64aca82d8117c267be83db278f6717'
AND (
token = '61NUDKaAMAMp2PNKDNTFvaQuZR3WDh/yGQiMe1zI+qM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)