UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v4kOa8pkmyvdbKStMQ9hHGV8tRbXcDBohPScRmCUA/c='
WHERE
key_id = '6deb361dc313d6ee45b5bec5f96a2596dd97c399e219d68da16e433dd4c72e90'
AND (
token = 'v4kOa8pkmyvdbKStMQ9hHGV8tRbXcDBohPScRmCUA/c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)