UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iOSZaKT/nDVq/++Uw5sAWKDqsbQPLg+nZpx/irNKaJA='
WHERE
key_id = 'f3f293e7bc16a9c8ef95b9fbe261a038619efa501916e8aa1ed5f7ca0bbc8d5e'
AND (
token = 'iOSZaKT/nDVq/++Uw5sAWKDqsbQPLg+nZpx/irNKaJA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)