UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'w6tRa0DAXBnCrrzINONBCKi5yQR9/I/VOzVwQ9kpbXI='
WHERE
key_id = '35221a11bbdd754664d1b9cc7c018a968cbd25bc3c2493e7d1c676857d8dcac8'
AND (
token = 'w6tRa0DAXBnCrrzINONBCKi5yQR9/I/VOzVwQ9kpbXI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)