UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zK+1H1eUq1CgJUPT9COZ2N5xIvqSZ8VjCNdNboJgEcY='
WHERE
key_id = 'e7969c135ad76e2643782bac3599f101e3147e0cddcc6ca2f82ab4451699f45b'
AND (
token = 'zK+1H1eUq1CgJUPT9COZ2N5xIvqSZ8VjCNdNboJgEcY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)