UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VxsTRBO9DLmV4sF86iZwqSSFOA9fP/iQ7QCCV5DtejA='
WHERE
key_id = '01e28da4850995664b3e0e65c8249713cd2ea2f6d9fd7f9850d90bdaf6d1e96a'
AND (
token = 'VxsTRBO9DLmV4sF86iZwqSSFOA9fP/iQ7QCCV5DtejA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)