UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6ZzQ4FK/S4awKhQD4j4aqH1cEXL5N+8Y/EFjsM/cY7Q='
WHERE
key_id = 'b1a8d79bd34ee343df7773115c3079753e928ec6928c16f777cb9e28c8a1031f'
AND (
token = '6ZzQ4FK/S4awKhQD4j4aqH1cEXL5N+8Y/EFjsM/cY7Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)