UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ROh0/N9x2Zcq5JFL/vZYR7aXOZmdUS9sY2sZqMr3zBY='
WHERE
key_id = 'a893069004b1aad60f67b0d022b74b7418f2bc5e90e438370a9601f2e3b7931b'
AND (
token = 'ROh0/N9x2Zcq5JFL/vZYR7aXOZmdUS9sY2sZqMr3zBY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)