UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FTxlUERkE2UZxtWGVDatK4H8LvJQhwB7D9loZKmMREI='
WHERE
key_id = '882a01050ceb0968f6fdbe6d6ba1c032979bbffdca104783aa80cb51db43c93c'
AND (
token = 'FTxlUERkE2UZxtWGVDatK4H8LvJQhwB7D9loZKmMREI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)