UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1MkJCQvmVLGtLwMAkWvse40lCyBJ4DZKxw1wrGeuwOg='
WHERE
key_id = '725c7af27248b47243654f4774eef576f4d7be32aa8894d48f42bcacfa7ea852'
AND (
token = '1MkJCQvmVLGtLwMAkWvse40lCyBJ4DZKxw1wrGeuwOg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)