UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+qvcOlnyjhwQFQCa8K2Z6LOSqbMb6HxL0qIJrW2CQ88='
WHERE
key_id = '68800788ab0c53661a551e1808596ee34c7c8b02001290d9348194f4a0c11de9'
AND (
token = '+qvcOlnyjhwQFQCa8K2Z6LOSqbMb6HxL0qIJrW2CQ88='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)